import request from '@/utils/request'

export function saveAudioDetail(courseId, data) {
  return request({
    url: `/courses/${courseId}/audios`,
    method: 'post',
    data
  })
}

export function getAudioDetail(courseId) {
  return request({
    url: `/courses/${courseId}/audios`,
    method: 'get'
  })
}
export function getAudioList(courseId) {
    return request({
      url: `/courses/${courseId}/getCourseAudio`,
      method: 'get'
    })
  }

export function delAudio(courseDetailId){
    return request({
        url: `/courses/${courseDetailId}/delCourseAudio`,
        method: 'post'
    })
}
  

export function audioSlice(courseDetailId) {
    return request({
        url: `/courses/${courseDetailId}/audios/slice`,
        method: 'post'
    })
}

export function getCourseVedio(courseId) {
    return request({
        url: `/courses/getCourseVedio/${courseId}`,
        method: 'get'
    })
}

export function getCourseVedioById(courseDetailId) {
    return request({
        url: `/courses/getCourseVedioById/${courseDetailId}`,
        method: 'get'
    })
}

export function setCourseVedio(data) {
    return request({
        url: `/courses/setCourseVedio`,
        method: 'post',
        data
    })
}

export function setLetCourseVedio(data) {
    return request({
        url: `/courses/setLetCourseVedio`,
        method: 'post',
        data
    })
}

export function initLetV() {
    return request({
        url: `/video/initLetV`,
        method: 'get'
    })
}

export function deleteTxFile(pfVideoId) {
    return request({
        url: `/video/deleteTxFile/${pfVideoId}`,
        method: 'get'
    })
}

export function convertTxVodFile(pfVideoId) {
    return request({
        url: `/video/convertTxVodFile/${pfVideoId}`,
        method: 'get'
    })
}

export function delVideos(courseId) {
    return request({
        url: `/video/delVideos/${courseId}`,
        method: 'get'
    })
}